package com.zyj.handler;

import java.lang.reflect.Method;

/**
 * 注解方式开发真正的处理器，注解开发方式下需要建立url和HandlerMethod的映射关系
 */
public class HandlerMethod {

    //持有controller和method

    // 注解开发的Controller的bean对象，也就是添加了Controller注解的类的bean对象，因为bean对象有多种类型，所以此处要定义为Object类型来持有controller bean
    private Object controller;
    // Controller类中的某个方法对象
    private Method method;

    public HandlerMethod(Object controller, Method method) {
        this.controller = controller;
        this.method = method;
    }

    public Object getController() {
        return controller;
    }

    public void setController(Object controller) {
        this.controller = controller;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }
}
